Skip to content

Conversation

@lantoli
Copy link
Member

@lantoli lantoli commented Oct 30, 2025

Fix v1x tests. Rename TestMigBackupRSCloudBackupSchedule_copySettings to TestV1xMigBackupRSCloudBackupSchedule_copySettings so it's run in advanced_cluster_tpf_mig_from_sdkv2 test group.

In this way all v1x tests run in the same test group.

Before this PR it was run in the regular backup test group. For example the tests would fail for SA as v1.x providers don't support SA.

Example of advanced_cluster executions for PAK and SA.

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contributing guides
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • If changes include deprecations or removals I have added appropriate changelog entries.
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

@lantoli lantoli marked this pull request as ready for review November 4, 2025 13:25
@lantoli lantoli requested a review from a team as a code owner November 4, 2025 13:25
Copilot AI review requested due to automatic review settings November 4, 2025 13:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes v1x test organization by renaming and relocating a test function to ensure all v1x migration tests run in the same test group. This prevents test failures in environments where v1.x providers don't have support (e.g., Service Accounts).

  • Moved TestMigBackupRSCloudBackupSchedule_copySettings to a new v1x-specific test file and renamed it to follow v1x naming convention
  • Updated precheck functions to ensure proper test environment setup
  • Modified CI workflow to include the relocated test in the v1x test group

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/testutil/mig/pre_check.go Added PreCheckLast1XVersionSleep function combining v1x version check with sleep functionality
internal/service/cloudbackupschedule/resource_cloud_backup_schedule_migration_v1x_test.go New file containing the relocated and renamed v1x test function
internal/service/cloudbackupschedule/resource_cloud_backup_schedule_migration_test.go Removed the original test function and unused import
internal/service/advancedcluster/resource_migration_v1x_test.go Updated precheck calls and cleaned up variable declarations
.github/workflows/acceptance-tests-runner.yml Updated CI configuration to include cloudbackupschedule in v1x test packages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@EspenAlbert EspenAlbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TY!

@lantoli lantoli merged commit 5af41a4 into master Nov 4, 2025
52 checks passed
@lantoli lantoli deleted the tests_v1x branch November 4, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants